/**
 * Created by Administrator on 2017/6/28.
 */

import React from 'react'
import {AppRegistry} from 'react-native'
import { StackNavigator } from 'react-navigation'

import splash from './src/Tab/Splash'
import mainAty from './src/Tab/MainAty'
import newsDetails from './src/Tab/HotNewsDetails'
import messageList from './src/Tab/MessageList'
import messageDetails from './src/Tab/MessageDetails'
import userInfo from './src/Tab/UserInfo'
import profit from './src/Tab/Profit'
import profitDetails from './src/Tab/ProfitDetails'

import UmengPush from 'react-native-umeng-push';

//获取DeviceToken
UmengPush.getDeviceToken(deviceToken => {
    console.log("deviceToken: ", deviceToken);
});

//接收到推送消息回调
UmengPush.didReceiveMessage(message => {
    console.warn("didReceiveMessage:", message);
});

//点击推送消息打开应用回调
UmengPush.didOpenMessage(message => {
    console.warn("didOpenMessage:", message);
});

const root = StackNavigator({
    splash:{screen:splash},
    mainAty:{screen:mainAty},
    newsDetails:{screen:newsDetails},
    messageList:{screen:messageList},
    messageDetails:{screen:messageDetails},
    userInfo:{screen:userInfo},
    profit:{screen:profit},
    profitDetails:{screen:profitDetails}
})


AppRegistry.registerComponent('News',()=>root);
